import { createApp } from 'vue'
import { createPinia } from 'pinia'
import { createPersistedState } from 'pinia-persistedstate-plugin';

import App from './App.vue'
import router from './router'

import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import { zhCn } from 'element-plus/es/locales.mjs'

// 引入全局样式
import './styles/index.scss'

// 引入路由鉴权
import './premission'

const app = createApp(App)

const pinia = createPinia()
const persist = createPersistedState();
pinia.use(persist)

app.use(pinia)
app.use(router)
app.use(ElementPlus, {
    locale: zhCn
})

app.mount('#app')
